﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true"
    CodeBehind="wFrmManualesPartesVehiculosCargaAvanzada.aspx.cs" Inherits="Crosland.Automotriz.Web.Repuestos.wFrmManualesPartesVehiculosCargaAvanzada" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">
    <script type="text/javascript">

        function url() {
            open('RprtNoRegistradosArticulos.aspx', 'NewWindow', 'top=0,left=0,width=1150,height=650,status=yes,resizable=yes,scrollbars=yes');
        }
    </script>
      <div class="main-header" style="width:100%">
                <div class="main-titulo">
                    Carga avanzada de manuales </div>
               
</div>
    <div class="content-form">

        <table>
            <tr>
                <td>
                    <dx:ASPxButton ID="btnCargarExcel" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                        Text="Importar excel" AutoPostBack="False">
                        <ClientSideEvents Click="function(s, e) {
	PopupCargarExcel.Show();
}" />
                        <Image Url="~/Images/excel16.gif">
                        </Image>
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="btnGrabar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                        Text="Grabar" Width="100px" AutoPostBack="False" OnClick="btnGrabar_Click" 
                        Enabled="False">
                        <ClientSideEvents CheckedChanged="function(s, e) {

}" />
                        <Image Url="~/Images/save_16.gif">
                        </Image>
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="bntSalir" runat="server" Text="Salir" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                        CssPostfix="Office2010Blue" OnClick="bntSalir_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                        Width="100px" AutoPostBack="False">
                        <Image Url="~/Images/logout.png">
                        </Image>
                    </dx:ASPxButton>
                </td>
            </tr>
        </table>
        <dx:ASPxRoundPanel ID="rpListaManuales" runat="server" Width="100%" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
            CssPostfix="Office2010Blue" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px"
            GroupBoxCaptionOffsetY="-19px" HeaderText="Datos importados" 
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
            <HeaderStyle>
                <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
            </HeaderStyle>
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <table width="100%">
                        <tr>
                            <td style="width: 45px">
                                <dx:ASPxLabel ID="lblModelo" runat="server" Text="Modelo: ">
                                </dx:ASPxLabel>
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="cboModelo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SelectedIndex="0" Spacing="0"
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Height="30px">
                                    <Items>
                                        <dx:ListEditItem Selected="True" Text="Seleccione" />
                                    </Items>
                                    <ItemStyle Height="30px" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <DropDownButton Width="20px">
                                    </DropDownButton>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                    <Paddings PaddingLeft="5px" />
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxGridView ID="gvExcel" runat="server" AutoGenerateColumns="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                        CssPostfix="Office2010Blue" OnPageIndexChanged="gvExcel_PageIndexChanged" 
                        Caption="Listado de artículos" Width="100%" Settings-ShowGroupPanel="false">
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="SISTEMA" VisibleIndex="1" Caption="Sistema"
                                Width="200px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="NROPAGINA" VisibleIndex="2" Caption="Nro. Pagina"
                                Width="40px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="NROITEM" VisibleIndex="3" Caption="Nro. Ítem"
                                Width="40px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="PARTNRO" VisibleIndex="4" Caption="Cod. material"
                                Width="100px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="CANTIDAD" VisibleIndex="7" Caption="Cantidad"
                                Width="40px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="REMARK_ING" VisibleIndex="11" Caption="Remark ingles">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="DESCRIPCION_ESP" VisibleIndex="5" Caption="Descripción esp"
                                Width="150px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="ID_SISTEMA" VisibleIndex="12" Visible="False">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Remark español" FieldName="REMARK_ESP" VisibleIndex="10">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="SISTEMA_BD" Visible="False" VisibleIndex="0">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Descripción ing" FieldName="DESCRIPCION_ING"
                                VisibleIndex="6">
                            </dx:GridViewDataTextColumn>                       
                           
                        </Columns>
                        <SettingsPager PageSize="20">
                        </SettingsPager>
                        <Settings ShowFilterRow="True" />
                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <StylesPager>
                            <PageNumber ForeColor="#3E4846">
                            </PageNumber>
                            <Summary ForeColor="#1E395B">
                            </Summary>
                        </StylesPager>
                        <StylesEditors ButtonEditCellSpacing="0">
                            <ProgressBar Height="21px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                    <br />

                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxRoundPanel>
        <dx:ASPxPopupControl ID="PopupCargarExcel" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
            CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Importar" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
            Width="300px" ClientInstanceName="PopupCargarExcel" Modal="True" 
            PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
            <HeaderImage Url="~/Images/excel16.gif">
            </HeaderImage>
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <HeaderStyle>
                <Paddings PaddingLeft="7px" />
            </HeaderStyle>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
                <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                    <table>
                        <tr>
                            <td>
                                <dx:ASPxButton ID="btnPopFormato" runat="server" Text="Descargar formato" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" OnClick="btnPopFormato_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <Image Url="~/Images/excel16.gif">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td class="filas">
                                <dx:ASPxLabel ID="lblImportarArchivo" runat="server" Text="Archivo:">
                                </dx:ASPxLabel>
                            </td>
                            <td class="filas">
                                <dx:ASPxUploadControl ID="ucArchivo" runat="server" Width="350px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    OnFileUploadComplete="ucArchivo_FileUploadComplete">
                                    <ValidationSettings MultiSelectionErrorText="Attention! 

The following {0} files are invalid because they exceed the allowed file size ({1}) or their extensions are not allowed. These files have been removed from selection, so they will not be uploaded. 

{2}">
                                    </ValidationSettings>
                                </dx:ASPxUploadControl>
                            </td>
                        </tr>
                        
                    </table>
                    <table width="100%">
                        <tr>
                            <td align="right">
                                <dx:ASPxButton ID="btnImportarArchivo" runat="server" AutoPostBack="False" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" OnClick="btnImportarArchivo_Click" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Text="Importar archivo" Width="160px">
                                    <Image Url="~/Images/upload.png">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                            <td align="right" width="110px">
                                <dx:ASPxButton ID="btnCancelar" runat="server" Text="Cancelar" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    AutoPostBack="False" Width="100px">
                                    <ClientSideEvents Click="function(s, e) {
	PopupCargarExcel.Hide();
}" />
                                    <Image Url="~/Images/cancel.gif">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>
        <dx:ASPxPopupControl ID="popupMsjGeneral" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
            CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Mensaje" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
            Width="300px" ClientInstanceName="popupMsjGeneral" Modal="True" 
            PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
            <HeaderImage Url="~/Images/icon_message.png">
            </HeaderImage>
            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
            </LoadingPanelImage>
            <HeaderStyle>
                <Paddings PaddingLeft="7px" />
            </HeaderStyle>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <ContentCollection>
                <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                    <table style="width: 100%;">
                        <tr style="width: 100%;">
                            <td style="width: 100%;" align="center">
                                <dx:ASPxLabel ID="lblMsj" runat="server" Text="">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td align="center" style="width: 100%;">
                                &nbsp;
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 100%;" align="center">
                                <dx:ASPxButton ID="btnPopAceptar" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Text="Aceptar">
                                    <ClientSideEvents Click="function(s, e) {
	popupMsjGeneral.Hide();
}" />
                                    <Image Url="~/Images/ok.png">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>

    </div>
</asp:Content>
